package com.vitalfit.model.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class FoodItemDTO {

    private Integer id;

    @NotBlank(message = "Name must not be blank")
    @Size(min = 1, max = 255, message = "Name length must be between 1 and 255 characters")
    private String name;

    @Size(max = 500, message = "Description length must be less than 500 characters")
    private String description;

    @NotNull(message = "Base price must not be null")
    @DecimalMin(value = "0.00", message = "Base price must be non-negative")
    @Digits(integer=10, fraction=2, message = "Base price must not be greater than 10 digits with 2 decimal places")
    private BigDecimal basePrice;

    @NotEmpty(message = "At least one category ID must be specified")
    private List<Integer> categoryIds; // 用于存储关联的食品类别ID

    private String imageUrl;




}
